package com.order.bootstrap;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

/**
 * 演示：
 * 处理订单流程
 * 动态读取配置中心配置信息
 * */
@ComponentScan(value = "com.order.controller")
@SpringBootApplication
public class OrderServiceApplication extends SpringBootServletInitializer{

    public static void main(String[] args){
        SpringApplication.run(OrderServiceApplication.class,args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.web(true).sources(OrderServiceApplication.class);
    }
}
